package com.dolphin.core.response;

import com.google.common.collect.Lists;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author shida
 */
@Setter
@Getter
@ToString
public class PageVO<T, P> implements Serializable {
    private Long totalCount;
    private List<T> results;
    private P summary;

    public PageVO(){
        results = Lists.newArrayList();
    }

    public PageVO(Long totalCount, List<T> results){
        this.totalCount = totalCount;
        this.results = results;
    }

    public PageVO(Long totalCount, List<T> results, P summary){
        this.totalCount = totalCount;
        this.results = results;
        this.summary = summary;
    }

}
